local key     = KEYS[1]
local value   = ARGV[1]
local cacheValue = redis.call('get', key)
if not cacheValue then
    return 0
elseif cacheValue==value then
    return redis.call('del', key)
else
    return -1
end